{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "5cc1a898",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(238, 180, 3)\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "import cv2 as cv\n",
    "from matplotlib import pyplot as plt\n",
    "\n",
    "img = cv.imread('../data/opencv-logo-white.png')\n",
    "print(img.shape)\n",
    "\n",
    "kernel = np.ones((5,5),np.float32)/25\n",
    "dst = cv.filter2D(img,-1,kernel)\n",
    "\n",
    "res = np.hstack((img, dst))\n",
    "cv.imshow(\"res\", res)\n",
    "cv.waitKey(0)\n",
    "cv.destroyAllWindows()\n",
    "\n",
    "# plt.subplot(121),plt.imshow(img),plt.title('Original')\n",
    "# plt.xticks([]), plt.yticks([])\n",
    "# plt.subplot(122),plt.imshow(dst),plt.title('Averaging')\n",
    "# plt.xticks([]), plt.yticks([])\n",
    "\n",
    "# plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "14a2e14f",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
